77e22a395540a8fa2015f0ac8d63e0b0cb5c478a
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 1"""
4  date="2023-04-24T15:13:35Z"
5  content="""
6 The next release is going to escape and quote filenames that contain
7 special characters similarly to how git does. (But json will not be affected due
8 to already being escaped.)
9
10 This will affect filenames output in error messages. So if you are
11 parsing error messages or non-json output with filenames that contain
12 characters that need to be escaped, you will need to deal with the
13 change.
14
15 See [[todo/terminal_escapes_in_filenames]] for the full details of this
16 change.
17
18 One thing I noticed about your example is that git-annex add doesn't display
19 that particular filename the same as git add does:
20
21         joey@darkstar:~/tmp/xxx>git-annex add 'gl\orious'
22         git-annex: "gl\\orious" not found
23         joey@darkstar:~/tmp/xxx>git add 'gl\orious'
24         fatal: pathspec 'gl\orious' did not match any files
25
26 But, that is an inconsistency in git itself. More commonly it uses the same
27 display as git-annex for this filename:
28
29         joey@darkstar:~/tmp/xxx>touch 'gl\orious'
30         joey@darkstar:~/tmp/xxx>git add 'gl\orious'
31         joey@darkstar:~/tmp/xxx>git diff --cached
32         diff --git "a/gl\\orious" "b/gl\\orious"
33         new file mode 100644
34         index 0000000..e69de29
35
36 So I don't think there's a problem with git-annex's behavior here. With
37 that said, we can talk about adding something to make back-compatability
38 easy for you, or whatever. An config like core.quotePath but that also
39 affects special characters, not just unicode, for example.
40 """]]